﻿
@(Html.Telerik().TreeView().Name("fields").DragAndDrop(settings => settings.DropTargets(".ws-fields")).ExpandAll(true)
        .ClientEvents(events => events.OnNodeDrop("onFieldDrop"))
        .Items(item =>
        {
            item.Add().Text("表单字段").ImageUrl("~/images/127.png")
            .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
            .Items(subitem =>
            {
                subitem.Add().Text("文本编辑框").HtmlAttributes(new {controltype="text"});
                subitem.Add().Text("数字编辑框").HtmlAttributes(new { controltype = "number" });
                subitem.Add().Text("富文本编辑框").HtmlAttributes(new { controltype = "richtext" });
                subitem.Add().Text("单选框").HtmlAttributes(new { controltype = "singleselection" });
                subitem.Add().Text("多选框").HtmlAttributes(new { controltype = "multipleselection" });
                subitem.Add().Text("下拉框").HtmlAttributes(new { controltype = "dropdownlist" });
                subitem.Add().Text("超链接").HtmlAttributes(new { controltype = "hyperlink" });
                subitem.Add().Text("滑动控件").HtmlAttributes(new { controltype = "slider" });
                subitem.Add().Text("找人控件").HtmlAttributes(new { controltype = "peoplefinder" });
                subitem.Add().Text("日期控件").HtmlAttributes(new { controltype = "datepicker" });
            });
        })
)

@(Html.Telerik().TreeView().Name("conditions").DragAndDrop(settings => settings.DropTargets(".ws-conditions")).ExpandAll(true)
            .ClientEvents(events => events.OnNodeDrop("onConditionDropped"))
        .Items(item =>
        {
            item.Add().Text("条件").ImageUrl("~/images/127.png")
            .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
            .Items(subitem =>
            {
                subitem.Add().Text("文字类型").HtmlAttributes(new { conditiontype = "text" });
                subitem.Add().Text("数字类型").HtmlAttributes(new { conditiontype = "number" });
                subitem.Add().Text("日期类型").HtmlAttributes(new { conditiontype = "time" });
            });
        })
)

@(Html.Telerik().TreeView().Name("participants").DragAndDrop(settings => settings.DropTargets(".ws-participants")).ExpandAll(true)
          .ClientEvents(events => events.OnNodeDrop("onParticipantDrop"))
          .Items(item =>
          {
              item.Add().Text("参与角色").ImageUrl("~/images/106.png")
              .ImageHtmlAttributes(new { alt = "activity Icon", @class = "process_designtoolbox_treeview_title_img" })
              .Items(subitem =>
              {
                  subitem.Add().Text("角色").HtmlAttributes(new { controltype = "text" });

              });
          })
)

@(Html.Telerik().TreeView().Name("activityresults").DragAndDrop(settings => settings.DropTargets(".ws-activityresults")).ExpandAll(true)
          .ClientEvents(events => events.OnNodeDrop("onActivityResultDropped"))
          .Items(item =>
          {
              item.Add().Text("环节结果").ImageUrl("~/images/106.png")
              .ImageHtmlAttributes(new { alt = "activity Icon", @class = "process_designtoolbox_treeview_title_img" })
              .Items(subitem =>
              {
                  subitem.Add().Text("环节结果").HtmlAttributes(new { controltype = "activityresult" });

              });
          })
)

@(Html.Telerik().TreeView().Name("activities").DragAndDrop(settings => settings.DropTargets(".ws-activities")).ExpandAll(true)
          .ClientEvents(events => events.OnNodeDrop("onActivityDrop"))
          .Items(item =>
          {
              item.Add().Text("审批环节").ImageUrl("~/images/106.png")
              .ImageHtmlAttributes(new { alt = "activity Icon", @class = "process_designtoolbox_treeview_title_img" })
              .Items(subitem =>
              {
                  subitem.Add().Text("环节").HtmlAttributes(new { controltype = "text" });
                  //subitem.Add().Text("审核环节").HtmlAttributes(new { controltype = "number" });
                  //subitem.Add().Text("知会环节").HtmlAttributes(new { controltype = "number" });
                  //subitem.Add().Text("执行环节").HtmlAttributes(new { controltype = "number" });

              });
          })
)


@(Html.Telerik().TreeView().Name("others").DragAndDrop(settings => settings.DropTargets(".ws-queues, .ws-containers"))
          .ClientEvents(events => events.OnNodeDrop("onOthersDrop"))
          .Items(item =>
          {
              item.Add().Text("其他").ImageUrl("~/images/127.png")
                       .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
                       .Items(subItem =>
                       {
                           subItem.Add().Text("队列").HtmlAttributes(new {@class="dt-queue" })
                                   .ImageUrl("~/images/44.png")
                                   .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" });
                           subItem.Add().Text("环节容器").HtmlAttributes(new { @class = "dt-container" })
                                   .ImageUrl("~/images/44.png")
                                   .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" });
                       }
                     );
          })
)

